<!DOCTYPE html>
<html>

<head>
  <!-- Meta, title, CSS, favicons, etc. -->
  <meta charset="utf-8">
  <title>AbsoluteAdmin - A Responsive Boostrap 3 Admin Dashboard</title>
  <meta name="keywords" content="Bootstrap 3 Admin Dashboard Template Theme" />
  <meta name="description" content="AdminDesigns - Bootstrap 3 Admin Dashboard Theme">
  <meta name="author" content="AdminDesigns">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  


   {include file="/public/import_file" /}

     <!-- Vendor CSS -->
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/static/admin/vendor/plugins/magnific/magnific-popup.css">
   <script type="text/javascript">

   function shows(value){
    var selectedOption = value.options[value.selectedIndex];
    // alert(selectedOption.value);
    if(selectedOption.value==1){
      document.getElementById('hide').style.display ="block";
    }else{
      document.getElementById('hide').style.display ="none";
    }
    
   }



 
   </script>

</head>

<body class="admin-panels-page" data-spy="scroll" data-target="#nav-spy" data-offset="300">

 

  <!-- Start: Main -->
  <div id="main">

    <!-- Start: Header -->
    {include file="/public/header" /}
    <!-- End: Header -->

    <!-- Start: Sidebar -->
    <aside id="sidebar_left" class="nano nano-light affix">

      <!-- Start: Sidebar Left Content -->
      <div class="sidebar-left-content nano-content">

       

        <!-- Start: Sidebar Menu -->
        {include file="/public/menu" /}
        <!-- End: Sidebar Menu -->

	      <!-- Start: Sidebar Collapse Button -->
	      <div class="sidebar-toggle-mini">
	        <a href="#">
	          <span class="fa fa-sign-out"></span>
	        </a>
	      </div>
	      <!-- End: Sidebar Collapse Button -->

      </div>
      <!-- End: Sidebar Left Content -->

    </aside>


    <!-- Start: Content-Wrapper -->
    <section id="content_wrapper">

    

      <!-- Start: Topbar -->
      <header id="topbar" class="alt">
        <div class="topbar-left">
          <ol class="breadcrumb">
            <li class="crumb-active">
              <a href="{:url('Food/food')}">菜品信息管理</a>
            </li>
            <li class="crumb-icon">
              <a href="{url:('Food/food')}">
                <span class="imoon imoon-food"></span>
              </a>
            </li>
           <!--  <li class="crumb-link">
              <a href="{url:('Food/food')}">Home</a>
            </li> -->
            <!-- <li class="crumb-trail">Dashboard</li> -->
          </ol>
        </div>
        <div class="topbar-right">
          
          <div class="ml15 ib va-m" id="toggle_sidemenu_r">
            <a href="#" class="pl5">
              <i class="fa fa-sign-in fs22 text-primary"></i>
              <span class="badge badge-hero badge-danger">3</span>
            </a>
          </div>
        </div>
      </header>
      <!-- End: Topbar -->

      <!-- Begin: Content -->
      <section id="content" class="table-layout animated fadeIn">

      

    {include file="Food/typemenu" /}
         <!-- begin: .tray-center -->
        <div class="tray tray-center">
        
        <form method="post" action="{:url('edit_food')}" enctype="multipart/form-data">
          <!-- create new order panel -->
          <div class="panel mb25 mt5" >
            <div class="panel-heading">
              <input type="hidden" name="food_id" value="{$food.food_id}">
              <input type="hidden" name="type_id" value="{$food.type_id}">
              <span class="panel-title hidden-xs">修改菜品信息</span>            
            </div>
            <div class="panel-body p20 pb10">
              <div class="tab-content pn br-n admin-form">
                <div id="tab1_1" class="tab-pane active">

                  <div class="section row mbn">
                  <div class="col-md-3">
                      <div class="fileupload fileupload-new admin-form" data-provides="fileupload">
                        <div class="fileupload-preview thumbnail mb15">
                          <img data-src="holder.js/100%x147" alt="holder" src="__PUBLIC__/static/admin/Uploads/foodpic/{$food.pic}">
                        </div>
                        <span class="button btn-system btn-file btn-block ph5" >
                          <span class="fileupload-new">选择图片</span>
                          <span class="fileupload-exists">重新选择</span>
                          <input type="file" name="pic" value="{$food.pic}" >
                       </span>
                      </div>
                    </div>
                     <input type="hidden" name="pic" value="{$food.pic}" >
                    <div class="col-md-9 pl15">
                      <div class="section row mb15">
                        <div class="col-xs-6">
                          <label for="foodname" class="field prepend-icon">
                            <input type="text" name="foodname" id="foodname" value="{$food.foodname}" class="event-name gui-input br-light light" placeholder="输入菜名">
                            <label for="foodname" class="field-icon">
                              <i class="imoon imoon-food"></i>
                            </label>
                          </label>
                        </div>
                        <div class="col-xs-6">
                          <label for="price" class="field prepend-icon">
                            <input type="text" name="price" id="price" class="event-name gui-input br-light light" placeholder="输入价格" value="{$food.price}">
                            <label for="price" class="field-icon">
                             <i class="fa fa-jpy"></i>
                            </label>
                          </label>
                        </div>
                      </div>
                      <div class="section row mb15">
                        <div class="col-xs-6">
                          <label for="isspecial" class="field prepend-icon">
                            <select class="form-control" name="isspecial" onclick="shows(this)"  title="是否设置特价菜">
                           
                            {if condition="($food.isspecial  == 1)"}
                             <option value="{$food.isspecial}">是</option>
                             <option value="0">否</option>{else/}
                             <option value="{$food.isspecial}">否</option>
                             <option value="1">是</option>
                             {/if}
                     
                             </select>
                           
                          </label>
                        </div>
                        <div class="col-xs-6" >
                          <label for="recommand" class="field prepend-icon">
                             <select class="form-control" name="recommand"  title="是否设置为特色菜" >
                            {if condition="($food.recommand  == 1)"}
                             <option value="{$food.recommand}">是</option>
                             <option value="0">否</option>{else/}
                             <option value="{$food.recommand}">否</option>
                             <option value="1">是</option>
                             {/if}
                            
                     
                             </select>
                          </label>
                        </div>
                      </div>
                    {if condition="($food.isspecial == 1)"}
                       <div class="section row mb15" id="hide" style="display: block;">{else/}<div class="section row mb15" id="hide" style="display: none;">{/if}
                        <div class="col-xs-4">
                          <label for="specialprice" class="field prepend-icon">
                            <input type="text" name="specialprice" id="specialprice" class="event-name gui-input br-light light" placeholder="输入特价价格" value="{$food.specialprice}">
                            <label for="specialprice" class="field-icon">
                              <i class="icon-price-tag "></i>
                            </label>
                          </label>
                        </div>
                        <div class="col-xs-4">
                          <label for="startdate" class="field prepend-icon">
                            <input type="date" name="startdate" id="startdate" class="event-name gui-input br-light light" title="特价起始时间" value="{$food.startdate|substr=###,0,10}">
                            <label for="startdate" class="field-icon">
                              <i class="fa fa-calendar"></i>
                            </label>
                          </label>
                        </div>
                        <div class="col-xs-4">
                          <label for="enddate" class="field prepend-icon">
                            <input type="date" name="enddate" id="enddate" class="event-name gui-input br-light light" title="特价终止时间" value="{$food.enddate|substr=###,0,10}">
                            <label for="enddate" class="field-icon">
                              <i class="fa fa-calendar"></i>
                            </label>
                          </label>
                        </div>
                      </div>
                      

                      <div class="section row mb15">
                        <div class="col-xs-4">
                          <label for="fee" class="field prepend-icon">
                            <input type="text" name="fee" id="fee" class="event-name gui-input br-light light" placeholder="输入餐盒费用" value="{$food.fee}" >
                            <label for="fee" class="field-icon">
                             <i class="fa fa-jpy"></i>
                            </label>
                          </label>
                        </div>
                        <div class="col-xs-8">
                          <label for="intro" class="field prepend-icon">
                            <input type="text" name="intro" id="intro" class="event-name gui-input br-light light" placeholder="输入菜品介绍"  value="{$food.intro}">
                            <label for="intro" class="field-icon">
                              <i class="fa fa-pencil"></i>
                            </label>
                          </label>
                        </div>
                      </div>

                       <div class="section row mb15">
                       <div class="col-xs-12">
                       <input type="submit" class="event-name gui-input br-light bg-light" value="点击修改"></div>
                      </div>
                     
                    </div>
                    
                  </div>
                  <!-- end section row -->

                </div>
               
               
              </div>
            </div>
          </div>
       </form>
          <!-- recent orders table -->
         
        <!-- end: .tray-center -->


      </section>
      <!-- End: Content -->

    </section>

  
     



    <!-- Start: Right Sidebar -->
    <aside id="sidebar_right" class="nano affix">

      <!-- Start: Sidebar Right Content -->
      <div class="sidebar-right-content nano-content">

        <div class="tab-block sidebar-block br-n">
          <ul class="nav nav-tabs tabs-border nav-justified hidden">
            <li class="active">
              <a href="#sidebar-right-tab1" data-toggle="tab">Tab 1</a>
            </li>
            <li>
              <a href="#sidebar-right-tab2" data-toggle="tab">Tab 2</a>
            </li>
            <li>
              <a href="#sidebar-right-tab3" data-toggle="tab">Tab 3</a>
            </li>
          </ul>
          <div class="tab-content br-n">
            <div id="sidebar-right-tab1" class="tab-pane active">

              <h5 class="title-divider text-muted mb20"> Server Statistics
                <span class="pull-right"> 2013
                  <i class="fa fa-caret-down ml5"></i>
                </span>
              </h5>
              <div class="progress mh5">
                <div class="progress-bar progress-bar-primary" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 44%">
                  <span class="fs11">DB Request</span>
                </div>
              </div>
              <div class="progress mh5">
                <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 84%">
                  <span class="fs11 text-left">Server Load</span>
                </div>
              </div>
              <div class="progress mh5">
                <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 61%">
                  <span class="fs11 text-left">Server Connections</span>
                </div>
              </div>

              <h5 class="title-divider text-muted mt30 mb10">Traffic Margins</h5>
              <div class="row">
                <div class="col-xs-5">
                  <h3 class="text-primary mn pl5">132</h3>
                </div>
                <div class="col-xs-7 text-right">
                  <h3 class="text-success-dark mn">
                    <i class="fa fa-caret-up"></i> 13.2% </h3>
                </div>
              </div>

              <h5 class="title-divider text-muted mt25 mb10">Database Request</h5>
              <div class="row">
                <div class="col-xs-5">
                  <h3 class="text-primary mn pl5">212</h3>
                </div>
                <div class="col-xs-7 text-right">
                  <h3 class="text-success-dark mn">
                    <i class="fa fa-caret-up"></i> 25.6% </h3>
                </div>
              </div>

              <h5 class="title-divider text-muted mt25 mb10">Server Response</h5>
              <div class="row">
                <div class="col-xs-5">
                  <h3 class="text-primary mn pl5">82.5</h3>
                </div>
                <div class="col-xs-7 text-right">
                  <h3 class="text-danger mn">
                    <i class="fa fa-caret-down"></i> 17.9% </h3>
                </div>
              </div>

              <h5 class="title-divider text-muted mt40 mb20"> Server Statistics
                <span class="pull-right text-primary fw600">USA</span>
              </h5>


            </div>
            <div id="sidebar-right-tab2" class="tab-pane"></div>
            <div id="sidebar-right-tab3" class="tab-pane"></div>
          </div>
          <!-- end: .tab-content -->
        </div>
      </div>
    </aside>
    <!-- End: Right Sidebar -->

  </div>
  <!-- End: Main -->


  <style>
  /* page demo styles */
  #p13 .panel-colorbox .bg-primary,
  #p13 .panel-colorbox .bg-info,
  #p13 .panel-colorbox .bg-danger,
  #p13 .panel-colorbox .bg-alert,
  #p13 .panel-colorbox .bg-dark {
    display: none;
  }
  </style>

  <!-- BEGIN: PAGE SCRIPTS -->

  <!-- jQuery -->
  <script src="__PUBLIC__/static/admin/vendor/jquery/jquery-1.11.1.min.js"></script>
  <script src="__PUBLIC__/static/admin/vendor/jquery/jquery_ui/jquery-ui.min.js"></script>

 <!-- Page Plugins -->
  <script src="__PUBLIC__/static/admin/vendor/plugins/magnific/jquery.magnific-popup.js"></script>

<!-- FileUpload JS -->
  <script src="__PUBLIC__/static/admin/vendor/plugins/fileupload/fileupload.js"></script>
  <script src="__PUBLIC__/static/admin/vendor/plugins/holder/holder.min.js"></script>


  <!-- Theme Javascript -->
  <script src="__PUBLIC__/static/admin/assets/js/utility/utility.js"></script>
  <script src="__PUBLIC__/static/admin/assets/js/demo/demo.js"></script>
  <script src="__PUBLIC__/static/admin/assets/js/main.js"></script>
  <script type="text/javascript">
  jQuery(document).ready(function() {

    "use strict";

    // Init Theme Core    
    Core.init();

    // Init Demo JS  
    Demo.init();


    // Init Widget Demo JS
    // demoWidgets.init();

    // Because we are using Admin Panels we use the OnFinish 
    // callback to activate the demoWidgets. It's smoother if
    // when we let the panels be moved and organized before 
    // filling them with content from various plugins

    // Init plugins used on this page
    // HighCharts, JvectorMap, Admin Panels

    // Init Admin Panels on widgets inside the ".admin-panels" container
    $('.admin-panels').adminpanel({
      grid: '.admin-grid',
      draggable: true,
      mobile: false,
      callback: function() {
        bootbox.confirm('<h3>A Custom Callback!</h3>', function() {});
      },
      onFinish: function() {
        $('.admin-panels').addClass('animated fadeIn').removeClass('fade-onload');

        // Init Demo settings 
        $('#p0 .panel-control-color').click();

        // Init Demo settings 
        $('#p1 .panel-control-title').click();

        // Create an example admin panel filter
        $('#admin-panel-filter a').on('click', function() {
          var This = $(this);
          var Value = This.attr('data-filter');

          // Toggle any elements whos name matches
          // that of the buttons attr value
          $('.admin-filter-panels').find($(Value)).each(function(i, e) {
            if (This.hasClass('active')) {
              $(this).slideDown('fast').removeClass('panel-filtered');
            } else {
              $(this).slideUp().addClass('panel-filtered');
            }
          });
          This.toggleClass('active');
        });

      },
      onSave: function() {
        $(window).trigger('resize');
      }
    });


  




  });
  </script>
  <!-- END: PAGE SCRIPTS -->


</body>

</html>
